logto_core
library
Functions
buildOrganizationUrn (String organizationId )
→ String
Build the organization URN from organization ID.
fetchOidcConfig (Client httpClient , String endpoint )
→ Future <OidcProviderConfig >
Fetch the OIDC provider configuration.
fetchTokenByAuthorizationCode ({required Client httpClient , required String tokenEndPoint , required String code , required String codeVerifier , required String clientId , required String redirectUri , String ? resource })
→ Future <LogtoCodeTokenResponse >
Fetch token using the authorization code.
fetchTokenByRefreshToken ({required Client httpClient , required String tokenEndPoint , required String clientId , required String refreshToken , String ? resource , String ? organizationId , List <String > ? scopes })
→ Future <LogtoRefreshTokenResponse >
Fetch token using the refresh token.
fetchUserInfo ({required Client httpClient , required String userInfoEndpoint , required String accessToken })
→ Future <LogtoUserInfoResponse >
Fetch user info using the access token.
generateSignInUri ({required String authorizationEndpoint , required dynamic clientId , required String redirectUri , required String codeChallenge , required String state , List <String > ? scopes , List <String > ? resources , InteractionMode ? interactionMode , String prompt = _prompt })
→ Uri
Generate the sign-in URI (Authorization URI).
This URI will be used to initiate the OIDC authentication flow.
generateSignOutUri ({required String endSessionEndpoint , required String clientId , Uri ? postLogoutRedirectUri })
→ Uri
Generate the sign-out URI (End Session URI).
getOrganizationIdFromUrn (String organizationUrn )
→ String
revoke ({required Client httpClient , required String revocationEndpoint , required String clientId , required String token })
→ Future <void >
Revoke the token.
verifyAndParseCodeFromCallbackUri (String callbackUri , String redirectUri , String state )
→ String
A utility function to verify and parse the code from the authorization callback URI.