<!--
{
  "availability" : [
    "macOS: 10.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SecurityInterface",
  "identifier" : "/documentation/SecurityInterface/SFAuthorizationView/authorize(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Security Interface"
    ],
    "preciseIdentifier" : "c:objc(cs)SFAuthorizationView(im)authorize:"
  },
  "title" : "authorize(_:)"
}
-->

# authorize(_:)

Attempts to unlock the lock icon in the view.

```
func authorize(_ inSender: Any!) -> Bool
```

## Parameters

`inSender`

The authorization view to unlock.

## Discussion

This method has the same behavior as if the user clicked on the lock icon; if the user is authorized, the lock icon unlocks. If this method succeeds, it returns <doc://com.apple.documentation/documentation/Swift/true>; if it fails, the lock icon remains locked and the method returns <doc://com.apple.documentation/documentation/Swift/false>.

## See Also

[`func deauthorize(Any!) -> Bool`](/documentation/SecurityInterface/SFAuthorizationView/deauthorize(_:))

Sets the authorization state to unauthorized and locks the lock icon in the view.

[`func authorizationState() -> SFAuthorizationViewState`](/documentation/SecurityInterface/SFAuthorizationView/authorizationState())

Returns the current state of the authorization view.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)