Skip to content

Commit

Permalink
added login token options
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Nov 16, 2023
1 parent 8dc0417 commit 194b378
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions keycloak/keycloak.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type IKeycloak interface {
GetToken( tokenOptions gocloak.TokenOptions ) (*gocloak.JWT, error)
RefreshToken( refreshToken string ) (*gocloak.JWT, error)
Logout(refreshToken string) error
LoginTokenOptions() gocloak.TokenOptions
//
}

Expand Down
13 changes: 13 additions & 0 deletions keycloak/utils.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package keycloak

import (
"github.com/Nerzal/gocloak/v10"
))

Check failure on line 5 in keycloak/utils.go

View workflow job for this annotation

GitHub Actions / build (1.18.x)

syntax error: unexpected ), expecting semicolon or newline

Check failure on line 5 in keycloak/utils.go

View workflow job for this annotation

GitHub Actions / build (1.19.x)

syntax error: unexpected ), expecting semicolon or newline

Check failure on line 5 in keycloak/utils.go

View workflow job for this annotation

GitHub Actions / build (1.20.x)

syntax error: unexpected ) after top level declaration

Check failure on line 5 in keycloak/utils.go

View workflow job for this annotation

GitHub Actions / build (1.21.x)

syntax error: unexpected ) after top level declaration

func (g *gkeycloak) LoginTokenOptions() gocloak.TokenOptions {
return gocloak.TokenOptions{
GrantType: &GRANT_PASSWORD,
ClientID: &g.clientId,
ClientSecret: &g.clientSecret,
}
}

0 comments on commit 194b378

Please sign in to comment.