Skip to content

mobilusoss/go-mobilus-sso

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-mobilus-sso

Build Status codecov

mobiSeries SSOを行うライブラリーです

Marshal

sso := go_mobilus_sso.New(secret)
token, err := sso.Marshal(go_mobilus_sso.User{
    Name:        "テストマン",
    PermitLevel: 0,
    Token:       "thisistesttoken",
    DomainID:    "adm",
    PlusID:      "[email protected]",
    UserID:      "[email protected]",
    TenantID:    "mobilus",
})
if err != nil {
    panic(err)
}

// token: D97xRIS9a47POjX6R8pkjwyssFM2IF6IG2q_zSmRxINGtSmOweiy7NifAxi3b4Efk1TSh7yP6_dfQ6Exc_Twe1VhUv5B8gUs2KWA3eoNsV3nKMhdjj4gNYMwTgoXR1zbvFdnlgwoMJdJaLr93Fr-u1MZD6rKn31ZmswjWzyN76awGIiKORAL8x0Uc1NkJXDce7xsDEFgYHpWO1yj_8Z5QQ

Unmarshal

sso := go_mobilus_sso.New(secret)
user, err := sso.Unmarshal(cookie)
if err != nil {
    panic(err)
}

// user.Name
// user.PermitLevel
// user.Token
// user.DomainID
// user.PlusID
// user.UserID
// user.TenantID

About

mobiSeries Single Sign-On library for golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages