// ClientScopeHandler check the client allows to use scope
ClientScopeHandler check the client allows to use scope
// ClientScopeHandler check the client allows to use scope
func ClientScopeHandler(clientID, scope string) (allowed bool, err error) {
	if scope == "" {
		allowed = true
		return
	}
	cli, err := oauth2Svr.clientStore.GetByID(clientID)
	if err != nil {
		return
	}
	if client, ok := cli.(o2x.O2ClientInfo); ok {
		allowed = o2x.ScopeArrContains(client.GetScopes(), scope)
		return
	}
	allowed = true
	return
}
func ClientScopeHandler ( clientID , scope string ) ( allowed bool , err error ) { if scope == " " { allowed = true return } cli , err := oauth2Svr . clientStore . GetByID ( clientID ) if err != nil { return } if client , ok := cli . ( o2x . O2ClientInfo ) ; ok { allowed = o2x . ScopeArrContains ( client . GetScopes ( ) , scope ) return } allowed = true return }
ClientScopeHandler check the client allows to use scope
ClientScopeHandler check the client allows to use scope