Class List Method List File List

# Class: VertxAuthOauth2::AccessToken

Inherits:
  VertxAuthCommon::User
  - Object
  - VertxAuthCommon::User
  - VertxAuthOauth2::AccessToken
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/access_token.rb

## Instance Method Summary (collapse)

- - (Object) clear_cache
- - (Boolean) expired?
- - (AccessToken) initialize(j_del) constructor
  A new instance of AccessToken.
- - (Object) is_authorised(arg0 = nil)
- - (Object) j_del
- - (Object) logout
- - (Object) principal
- - (Object) refresh
- - (Object) revoke(token_type = nil)
- - (Object) set_auth_provider(arg0 = nil)

## Constructor Details

### - (`AccessToken`) initialize(j_del)

Returns a new instance of AccessToken

    10
    11
    12
    13
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/access_token.rb', line 10

    def initialize(j_del)
      super(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) clear_cache

Raises:

- (`ArgumentError`)

    30
    31
    32
    33
    34
    35
    36
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/access_token.rb', line 30

    def clear_cache
      if !block_given?
        @j_del.java_method(:clearCache, []).call()
        return self
      end
      raise ArgumentError, "Invalid arguments when calling clear_cache()"
    end

### - (`Boolean`) expired?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    54
    55
    56
    57
    58
    59
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/access_token.rb', line 54

    def expired?
      if !block_given?
        return @j_del.java_method(:expired, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling expired?()"
    end

### - (`Object`) is_authorised(arg0 = nil)

Raises:

- (`ArgumentError`)

    22
    23
    24
    25
    26
    27
    28
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/access_token.rb', line 22

    def is_authorised(arg0=nil)
      if arg0.class == String && block_given?
        @j_del.java_method(:isAuthorised, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(arg0,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling is_authorised(arg0)"
    end

### - (`Object`) j_del

    16
    17
    18
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/access_token.rb', line 16

    def j_del
      @j_del
    end

### - (`Object`) logout

Raises:

- (`ArgumentError`)

    85
    86
    87
    88
    89
    90
    91
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/access_token.rb', line 85

    def logout
      if block_given?
        @j_del.java_method(:logout, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling logout()"
    end

### - (`Object`) principal

Raises:

- (`ArgumentError`)

    38
    39
    40
    41
    42
    43
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/access_token.rb', line 38

    def principal
      if !block_given?
        return @j_del.java_method(:principal, []).call() != nil ? JSON.parse(@j_del.java_method(:principal, []).call().encode) : nil
      end
      raise ArgumentError, "Invalid arguments when calling principal()"
    end

### - (`Object`) refresh

Raises:

- (`ArgumentError`)

    63
    64
    65
    66
    67
    68
    69
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/access_token.rb', line 63

    def refresh
      if block_given?
        @j_del.java_method(:refresh, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling refresh()"
    end

### - (`Object`) revoke(token_type = nil)

Raises:

- (`ArgumentError`)

    74
    75
    76
    77
    78
    79
    80
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/access_token.rb', line 74

    def revoke(token_type=nil)
      if token_type.class == String && block_given?
        @j_del.java_method(:revoke, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(token_type,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling revoke(token_type)"
    end

### - (`Object`) set_auth_provider(arg0 = nil)

Raises:

- (`ArgumentError`)

    46
    47
    48
    49
    50
    51
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-auth-oauth2/access_token.rb', line 46

    def set_auth_provider(arg0=nil)
      if arg0.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:setAuthProvider, [Java::IoVertxExtAuth::AuthProvider.java_class]).call(arg0.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling set_auth_provider(arg0)"
    end