-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
170 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// ReservedResource.swift | ||
// | ||
// | ||
// Created by Gao Sun on 2023/11/28. | ||
// | ||
|
||
import Foundation | ||
|
||
/// Resources that reserved by Logto, which cannot be defined by users. | ||
public enum ReservedResource: String { | ||
/// The resource for organization template per [RFC 0001](https://github.com/logto-io/rfcs). | ||
case organizations = "urn:logto:resource:organizations" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// UserScope.swift | ||
// | ||
// | ||
// Created by Gao Sun on 2023/11/28. | ||
// | ||
|
||
import Foundation | ||
|
||
public enum UserScope: String { | ||
/// The reserved scope for OpenID Connect. It maps to the `sub` claim. | ||
case openid | ||
/// The OAuth 2.0 scope for offline access (`refresh_token`). | ||
case offlineAccess = "offline_access" | ||
/// The scope for the basic profile. It maps to the `name`, `username`, `picture` claims. | ||
case profile | ||
/// The scope for the email address. It maps to the `email`, `email_verified` claims. | ||
case email | ||
/// The scope for the phone number. It maps to the `phone_number`, `phone_number_verified` claims. | ||
case phone | ||
/// The scope for the custom data. It maps to the `custom_data` claim. | ||
/// | ||
/// Note that the custom data is not included in the ID token by default. You need to | ||
/// use `fetchUserInfo()` to get the custom data. | ||
case customData = "custom_data" | ||
/// The scope for the identities. It maps to the `identities` claim. | ||
/// | ||
/// Note that the identities are not included in the ID token by default. You need to | ||
/// use `fetchUserInfo()` to get the identities. | ||
case identities | ||
/// The scope for user's roles for API resources. It maps to the `roles` claim. | ||
case roles | ||
/// Scope for user's organization IDs and perform organization token grant per [RFC 0001](https://github.com/logto-io/rfcs). | ||
/// | ||
/// To learn more about Logto Organizations, see [Logto docs](https://docs.logto.io/docs/recipes/organizations/). | ||
case organizations = "urn:logto:scope:organizations" | ||
/// Scope for user's organization roles per [RFC 0001](https://github.com/logto-io/rfcs). | ||
/// | ||
/// To learn more about Logto Organizations, see [Logto docs](https://docs.logto.io/docs/recipes/organizations/). | ||
case organizationRoles = "urn:logto:scope:organization_roles" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters