Authorize displays an HTML page for authorizing an application when the user
has first been redirected to this path and generates a code and redirects to
the app's callback URL after the user clicks "allow" on that page, which is
detected via the origin and referer headers.
Tokens
TODO: the sessions lifetime config passed is for coder api tokens.
Should there be a separate config for oauth2 tokens? They are related,
but they are not the same.
type OAuth2ProviderAppSecret struct {
// Formatted contains the secret. This value is owned by the client, not the// server. It is formatted to include the prefix.
Formatted string// Prefix is the ID of this secret owned by the server. When a client uses a// secret, this is the matching string to do a lookup on the hashed value. We// cannot use the hashed value directly because the server does not store the// salt.
Prefix string// Hashed is the server stored hash(secret,salt,...). Used for verifying a// secret.
Hashed string
}