Add OAuth2/OpenID Connect authorization server
Implement a full OAuth2 2.0 and OpenID Connect 1.0 authorization server with support for authorization code flow (with PKCE), refresh token rotation, device authorization grant, dynamic client registration, token introspection, and token revocation. Includes database schema, coredata layer, service logic, HTTP handlers, OIDC discovery endpoint, and JWKS publishing. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -47,6 +47,16 @@ func ParseGID(encoded string) (GID, error) {
|
||||
return gid, nil
|
||||
}
|
||||
|
||||
// MustParseGID parses a GID string and panics if it is invalid.
|
||||
func MustParseGID(encoded string) GID {
|
||||
id, err := ParseGID(encoded)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("invalid GID: %s", encoded))
|
||||
}
|
||||
|
||||
return id
|
||||
}
|
||||
|
||||
// New creates a new GID with default entity type and nil tenant ID
|
||||
func New(tenantID TenantID, entityType uint16) GID {
|
||||
id, err := NewGID(tenantID, entityType)
|
||||
|
||||
Reference in New Issue
Block a user