package
0.4.0-alpha.0
Repository: https://github.com/konveyor/move2kube-api.git
Documentation: pkg.go.dev
# Functions
DecodeJWT decodes the JSON web token and returns the payload.
DecodeToken verifies the signatures on a JWS access token and also decodes and returns the payload.
GetAccesTokenFromAuthzHeader returns the access token from the authorization bearer HTTP header.
GetAllJWKs returns all the JSON web keys that the server uses.
GetPermissionTicket gets a new permission ticket for use with the UMA grant flow.
GetTimestamp returns the current time in RFC 3339 (ISO 8601) standard format.
GetTokenUsingClientCreds gets a new access token using the client credentials.
GetTokenUsingRefreshToken gets a new access token using the refresh token.
GetUserRPT tries to get a Relying Party Token (RPT) fromt the authorization server using the UMA grant flow.
IsStringPresent checks if a value is present in a slice.
IsValidId returns true if the provided Id is valid.
NormalizeName normalizes the name.
# Constants
APP_NAME stores the application name.
APP_NAME_SHORT stores the application shortname.
AUTHENTICATE_HEADER_MSG is the message returned in the authentication header.
CONTENT_TYPE_BINARY is the MIME type for binary body.
CONTENT_TYPE_CLOUD_EVENT is the MIME type for CloudEvents spec json body.
CONTENT_TYPE_FORM_URL_ENCODED is the MIME type for URL encoded request bodies.
CONTENT_TYPE_JSON is the MIME type for json body.
DELIM is the route variable for separating the identity provider id and the user id.
IDP_ID_ROUTE_VAR is the route variable for the identity provider id.
LOGIN_CALLBACK_PATH is the URL endpoint to finish the login flow.
LOGIN_PATH is the URL endpoint to start the login flow.
OIDC_DISCOVERY_ENDPOINT_PATH is the OIDC discovery endpoint.
SESSIONS_DIR is the name of the directory where the sessions are stored.
UMA_CONFIGURATION_ENDPOINT_PATH is the well known UMA endpoint.
# Variables
AUTHENTICATE_HEADER is the authentication header.
AuthServerClient is the client used to interface with the Authorization server.
AUTHZ_HEADER is the authorization header.
Config contains the entire configuration for the API server.
CONTENT_TYPE_HEADER is the content type header.
ID_REGEXP is the regexp used to check if a Id is valid.
INVALID_NAME_CHARS_REGEXP is the regexp used to replace invalid name characters with hyphen.
KNOWN_API_VERSIONS is the list of known Move2Kube apiVersions.