mirror of
https://github.com/davidallendj/opaal.git
synced 2025-12-20 03:27:02 -07:00
Added CLI and more functionality
This commit is contained in:
parent
c04107cf3d
commit
053095c412
12 changed files with 199 additions and 92 deletions
BIN
internal/oidc/oidc-auth
Executable file
BIN
internal/oidc/oidc-auth
Executable file
Binary file not shown.
28
internal/oidc/oidc.go
Normal file
28
internal/oidc/oidc.go
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
package oidc
|
||||
|
||||
type OpenIDConnectProvider struct {
|
||||
Host string
|
||||
AuthorizeEndpoint string
|
||||
TokenEndpoint string
|
||||
ConfigEndpoint string
|
||||
}
|
||||
|
||||
func NewOIDCProvider() *OpenIDConnectProvider {
|
||||
return &OpenIDConnectProvider{
|
||||
Host: "https://gitlab.newmexicoconsortium.org",
|
||||
AuthorizeEndpoint: "/oauth/authorize",
|
||||
TokenEndpoint: "/oauth/token",
|
||||
}
|
||||
}
|
||||
|
||||
func (oidc *OpenIDConnectProvider) GetAuthorizeUrl() string {
|
||||
return oidc.Host + oidc.AuthorizeEndpoint
|
||||
}
|
||||
|
||||
func (oidc *OpenIDConnectProvider) GetTokenUrl() string {
|
||||
return oidc.Host + oidc.TokenEndpoint
|
||||
}
|
||||
|
||||
func (oidc *OpenIDConnectProvider) FetchServerConfiguration(url string) {
|
||||
// make a request to a server's openid-configuration
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue