---
title: "authorize(_:)"
framework: securityinterface
role: symbol
role_heading: Instance Method
path: "securityinterface/sfauthorizationview/authorize(_:)"
---

# authorize(_:)

Attempts to unlock the lock icon in the view.

## Declaration

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

## Parameters

- `inSender`: The authorization view to unlock.

## Discussion

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 true; if it fails, the lock icon remains locked and the method returns false.

## See Also

### Related Documentation

- [deauthorize(_:)](securityinterface/sfauthorizationview/deauthorize(_:).md)
- [authorizationState()](securityinterface/sfauthorizationview/authorizationstate().md)

### Setting the authorization state

- [deauthorize(_:)](securityinterface/sfauthorizationview/deauthorize(_:).md)
